home *** CD-ROM | disk | FTP | other *** search
- Path: ns2.borg.com!usenet
- From: warren@borg.com
- Newsgroups: comp.lang.rexx
- Subject: Re: LINEIN Question (another one)
- Date: 16 Apr 1996 21:46:54 GMT
- Organization: Team OS/2
- Distribution: inet
- Message-ID: <4l14ge$m7m@ns2.borg.com>
- References: <4ksfvk$3mpg@news-s01.ny.us.ibm.net> <4l0d7c$moj@cloud9.net>
- Reply-To: warren@borg.com (Warren Hall)
- NNTP-Posting-Host: l8.borg.com
- X-Newsreader: IBM NewsReader/2 v1.9d - NLS
-
- In <4l0d7c$moj@cloud9.net>, jalvo@cloud9.net (John Alvord) writes:
- >jsbarbe@ibm.net wrote:
- >: I can't figure out why my WARP REXX program fails. It is looping
- >through files
- >: (obtained with SysFileTree) and using LINEIN to read all the lines of each
- >: file and write them to a single output file. WORKS GREAT until it hits the 32nd
- >: file then it thinks all subsequent files have no lines. ie ... while lines(readfile) > 1
- >: finds a 0.
- >:
- >: First I set READFILE to be the path and file name from the SysFileTree.
- >: The read loop is preceded by a LINEIN(READFILE,1,0) (to make sure it's on 1st line)
- >: The LINEIN in the read loop is: LINEIN(READFILE)
- >:
- >: It's NOT the 32nd file, since I can move it to another directory where it is within
- >: the first 30 files and it reads fine
- >:
- >: It's not the subdirectory ... I've tried several and they all seem to fail at 32nd file.
- >:
- >: Is there some limit of "open files" that I must close after reading? Do I do that
- >: with a STREAM command?
- >: .. I'm stumped. Any ideas? Thanks, Steve
- >add a x=lineout(fn) after finishing each file processing.
- >
- >john alvord
- His question on the limit of "open files" is: the number of "file handles" defined in
- your operating system is just that. Early editions of Warp dropped from the
- common 90 count to the low thirties.
-
- In any event, it is always a good practice to close any files that you have finished
- processing. You can also use the stream command to close your files.
-
- Warren
- http://www.borg.com/~warren
-
-